<!doctype html>
<html>
      <head>
            <title>cmm</title>
            <meta charset="UTF-8"/>
            <link rel="stylesheet" type="text/css" href="css/easyui.css">
            <link rel="stylesheet" type="text/css" href="css/icon.css">
            <link rel="stylesheet" type="text/css" href="css/color.css">
            <link rel="stylesheet" type="text/css" href="css/public.css">
            <script type="text/javascript" src="js/lib/jquery.min.js"></script>
            <script type="text/javascript" src="js/lib/jquery.easyui.min.js"></script>
            <script type="text/javascript" src="js/common/config.js"></script>
      </head>
      <body class="easyui-layout">
        	<div data-options="region:'north',border:false">
               <div class="web-header">
                  <a class="logo" href="/">xx科技有限公司数据管理系统</a>
               </div>
        	</div>
        	<div data-options="region:'south',border:false">
               <div class="web-footer">
                  <h6>Copyright © 2006-2018 MvnRepository. All rights reserved.</h6>
                  <h6>Web site developed by @ocean</h6>
                  <a href="#">Contact Us</a>
               </div>
        	</div>   	
        	<div data-options="region:'center',border:false" id="login-content">
                <div class="easyui-panel" title="用户登录" style="width:400px;padding:30px 60px;">
                      <form id="ff" method="post">
                           <div style="margin-bottom:20px">
            								<input class="easyui-textbox" placeholder="用户名" name="username" style="width:100%" data-options="label:'用户名：',required:true">
            							 </div>
                            <div style="margin-bottom:20px">
              								<input class="easyui-passwordbox" placeholder="密码" name="password" style="width:100%" data-options="label:'密码：',required:true">
              							</div>
                      </form>
                      <div style="text-align:center;padding:5px 0">
            						<a href="javascript:void(0)" class="easyui-linkbutton c8" onclick="submitForm()" style="width:80px">登录</a>
            						<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="width:80px">重置</a>
            					</div>
                </div>
        	</div>
      </body>
      <script type="text/javascript">
          $(function(e){
          });
          function submitForm(){
          	$.ajax({
	          	url:config.url+"/user/login",
	          	type:'post',
	          	data:{username:'admin',password:'123456'},
	          	xhrFields:{withCredentials:true},
	          	success:function(data){
	          		if(data.code==200){
	          			location.href = "pages/main/main.html";
	          		}
	          	},
	          	error:function(data){
	          		console.log(data);
	          	}
	          });
          }
      </script>
</html>